from flask import g, Blueprint, redirect, url_for, request, jsonify, session, render_template, flash
from sqlalchemy import and_

from flask_login import current_user, login_user, logout_user, login_required

bp = Blueprint("user", __name__, url_prefix="/user")


# todo /login_out
@bp.route("/login_out", methods=['GET'])
@login_required
def login_out():
    logout_user()
    return redirect("/")


# @bp.route("/register", methods=['GET'])
# def register():
#     return render_template("register.html")
